import { createApp } from "vue";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import "@/assets/sdk/h5-js-sdk-1.5.21.js";
// normalize.css
import "normalize.css/normalize.css";
// 全局样式
import "@/styles/index.less";
import "vant/lib/index.css";
import "@/assets/font/font.css";
// 在使用函数组件时，unplugin-vue-components 无法自动引入对应的样式，因此需要手动引入样式。
import "vant/es/image-preview/style";
import "vant/es/toast/style";
// svg icon
import "virtual:svg-icons-register";
import "@/utils/rem";

import App from "./App.vue";
import router from "./router";
import vLoading from "./directives/loading";
import vConsole from "./directives/vConsole";

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

const app = createApp(App);

app.use(pinia);
app.use(router);
app.directive("loading", vLoading);
app.directive("vConsole", vConsole);
app.mount("#app");
